package com.app.check.cusDialog;

import java.util.List;

import com.app.check.R;

import android.content.Context;
import android.view.View;

public class MultiChoicDialog extends AbstractChoickDialog {

	private MultiChoicAdapter<String> mMultiChoicAdapter;
	protected void initData(boolean flag[]) {
		mMultiChoicAdapter = new MultiChoicAdapter<String>(mContext, mList,
				flag, R.drawable.dia_selector_checkbox1);

		mListView.setAdapter(mMultiChoicAdapter);
		mListView.setOnItemClickListener(mMultiChoicAdapter);

		Util.setListViewHeightBasedOnChildren(mListView);
	}
	
	
	public MultiChoicDialog(Context context, List<String> list, DialogModel model) {
		super(context, list,model);
		initData(model);
	}
	
	protected void initData(DialogModel model) {
		mMultiChoicAdapter = new MultiChoicAdapter<String>(mContext, mList,
				model, R.drawable.dia_selector_checkbox1);

		mListView.setAdapter(mMultiChoicAdapter);
		mListView.setOnItemClickListener(mMultiChoicAdapter);

		Util.setListViewHeightBasedOnChildren(mListView);
	}

	public boolean[] getSelectItem() {
		return mMultiChoicAdapter.getSelectItem();
	}

}
